#include "mythread.hpp"
#include <unistd.h>

void test()
{
    int count = 5;
    while(count--)
    {
        std::cout << "11111" << std::endl;
    }
}

int main()
{
    std::vector<Thread> t;
    for(int i = 0 ; i < 5 ; i++)
    {
        std::string name = "thread-";
        name += i;
        Thread threads(test,name);
        t.push_back(threads);
    }

    for(auto &thread : t)
    {
        thread.Start();
    }

    for(auto &thread : t)
    {
        thread.Jion();
    }

    return 0;
}